package com.xoa.service.partyMember;

import com.alibaba.fastjson.JSON;
import com.xoa.dao.WFE.WFEFlowTypeModelMapper;
import com.xoa.dao.WFE.WFEFormTypeMapper;
import com.xoa.dao.common.SysCodeMapper;
import com.xoa.dao.common.SysParaMapper;
import com.xoa.dao.department.DepartmentMapper;
import com.xoa.dao.duties.DutiesManagementMapper;
import com.xoa.dao.party.OrgDepartmentMapper;
import com.xoa.dao.partyMember.PartyMemberMapper;
import com.xoa.dao.users.UsersMapper;
import com.xoa.dao.work.WorkMapper;
import com.xoa.model.common.SysCode;
import com.xoa.model.common.SysPara;
import com.xoa.model.department.Department;
import com.xoa.model.knowledge.KnowledgeDocfile;
import com.xoa.model.party.OrgDepartmentWithBLOBs;
import com.xoa.model.partyMember.PartyMemberWithBLOBs;
import com.xoa.model.users.Users;
import com.xoa.model.workflow.FlowFast;
import com.xoa.model.workflow.FlowFormType;
import com.xoa.model.workflow.FlowRun;
import com.xoa.model.workflow.FlowTypeModel;
import com.xoa.service.WFE.WFERunner.WFEFlowRunInfo;
import com.xoa.util.*;
import com.xoa.util.common.StringUtils;
import com.xoa.util.common.log.FileUtils;
import com.xoa.util.common.session.SessionUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.jsoup.nodes.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;


public interface  PartyMemberService {

    Map getSysPara();

    ToJson<PartyMemberWithBLOBs> selectByPhase(Integer phase, Integer page, Integer limit);

    ToJson<PartyMemberWithBLOBs> selectAllPhase(Integer page, Integer limit);

    ToJson<PartyMemberWithBLOBs> insetParty(HttpServletRequest request);

    ToJson findPartyMember(HttpServletRequest request, Integer phase);

    ToJson initParty(HttpServletRequest request, Integer phase);

    Map<String, Object> getFlowData(String sqlType, Integer runId, Integer flowId);

    Document getFormDocument(Integer flowId);

    ToJson applyParty(HttpServletRequest request, HttpServletResponse response, PartyMemberWithBLOBs partyMemberWithBLOBs, Integer phase, String attrUrls);

    ToJson passParty(HttpServletRequest request, Integer phase, Integer page, Integer limit);

    String urlDown(HttpServletRequest request, String attachId, String attachName);

    String initUrl(HttpServletRequest request, String attachId, String attachName);

    ToJson partyInfo(HttpServletRequest request, String userId);

    ToJson activeParty(HttpServletRequest request, String userId, Integer phase);

    ToJson developParty(HttpServletRequest request, String userId, Integer phase);

    ToJson fourReport(HttpServletRequest request);

    ToJson progressParty(HttpServletRequest request, String userId, Integer phase);

    ToJson saveSysPara(String partySys);

    ToJson selectPhase(HttpServletRequest request, PartyMemberWithBLOBs partyMemberWithBLOBs);

    LimsJson getFileExport(HttpServletRequest request, HttpServletResponse response, Integer phase);

    LimsJson getFileExport(HttpServletRequest request, HttpServletResponse response);

    ToJson getTemp(HttpServletRequest request,Integer phase, String sqlType);

    ToJson selectDCandRP(HttpServletRequest request, String type,String userId);

    ToJson getPartyMemberList(String parentPedtId,String phase1, String phase2, Integer page ,Integer limit);

    ToJson updateTR(HttpServletRequest request, String url, Integer type,Integer n);

    ToJson initOne(Integer flowSort);

    ToJson updatePartyMemberFlowable(HttpServletRequest request);

}